<#macro header>
<#assign basePath=attrs.contextPath>
	<tbody>
		<div class="top_menu">
			<#if isUnitPage?exists && isUnitPage == true>
				<div class="top_links">
					<a class="help" href="">帮助中心</a>
				</div>
			<#else>
				<div class="top_links">
					<a class="setMP" href="">设为主页</a>
					|
					<a class="addFav" href="">加入收藏</a>
					|
					<a class="help" href="">帮助中心</a>
				</div>
			</#if>
		</div>
		
		<div class="logo_wrapper">
			<a class="logo_icon" href="${basePath}/overview"><img alt="Video Answers" src="${basePath}/static/images/logo.png"></a>
			<#if isStudent?exists && isStudent == true>
				<label class="welcome">你好， ${username!} !</label>
				<a class="student_bean list_item" href="#"><img src="${basePath}/static/images/golden_beans_lot.png">&nbsp;512颗</a>
				<a class="shopping_cart list_item" href="#"><img src="${basePath}/static/images/shopping_cart.png">&nbsp;购物车</a>
				<a class="student_center list_item" href="${basePath}/studentCenter"><img src="${basePath}/static/images/user.png">个人中心</a>
			
			<#elseif isTeacher?exists && isTeacher == true>
				<label class="welcome">你好， ${username!} !</label>
				<a class="teacher_bean list_item" href="#"><img src="${basePath}/static/images/golden_beans_lot.png">&nbsp;1020颗</a>
				<a class="teacher_center list_item" href="${basePath}/teacherCenter"><img style="width:20px; height:20px;" src="${basePath}/static/images/user.png">个人中心</a>
			
			<#elseif isUnitPage?exists && isUnitPage == true>
				<div></div>
			
			<#else>
				<form class="login_form" action="${basePath}/login" method="post">
					<input class="username_input" type="text" id="username" name="username" placeholder="请输入用户名/邮箱" required="required">
					<input class="password_input" type="password" id="password" name="password" placeholder="请输入密码" required="required">
					<label class="radio inline"  style="margin:0 0 12px 0;">
						<input type="radio" name="studentOrTeacher" value="student" checked>学生
					</label>
					<label class="radio inline" style="margin:0 5px 12px 0;">
						<input type="radio" name="studentOrTeacher" value="teacher">老师
					</label>
					<button class="btn btn-inverse" type="submit"  onclick="return loginCheck()">登 陆</button>
					<a href=${basePath}/studentRegister class="btn btn-inverse">注 册</a>
				</form>
			</#if>
		</div>
		
		<#if hasMainNav?exists && hasMainNav == false>
			<div></div>
		<#else>
			<div class="main_nav row-fluid navbar">
			    <ul id="nav" class="nav">
				    <li class="nav_item01 overview" name="overview"><a href=${basePath}/overview>首页</a></li>
				    <li name="realTimeAnswer"><a href=${basePath}/realTimeAnswer>实时回答</a></li>
				    <li name="videoAnswer"><a href=${basePath}/videoAnswer>视频答案</a></li>
				    <li name="videoLive"><a href=${basePath}/videoLive>课程直播</a></li>
				    <li name="parentCenter"><a href=${basePath}/parentCenter>家长中心</a></li>
			    </ul>
			</div>
		</#if>
	</tbody>
</#macro>